Skip to content

fix: make TestExecutionClientOnlyComparison pass#356

Merged
AnkushinDaniil merged 7 commits intomainfrom
daniil/test/system-test-fix-state-match
Oct 31, 2025
Merged

fix: make TestExecutionClientOnlyComparison pass#356
AnkushinDaniil merged 7 commits intomainfrom
daniil/test/system-test-fix-state-match

Conversation

@AnkushinDaniil
Copy link
Copy Markdown
Collaborator

@AnkushinDaniil AnkushinDaniil commented Oct 30, 2025

Implements EIP-2935 (historical block hash storage) for Arbitrum, enabling the TestExecutionClientOnlyComparison test to pass.

Dependencies

Changes

Core Implementation

  • EIP-2935 Contract Deployment:
    • Deploy history storage contract at ArbOS v40 upgrade
    • Uses Arbitrum-specific bytecode that reads arb_block_num instead of number
    • Contract address: 0x0000F90827F1C53a10cb7A02335B175320002935
  • Arbitrum-Specific History Storage Code:
  • Dynamic Spec Configuration:
    • Enable EIP-2935 and EIP-7709 for ArbOS v40+
    • EIP-7709 enables BLOCKHASH opcode to read from state
  • Remove Custom Implementation:
    • Removed ProcessParentBlockHash() method
    • Now uses Nethermind's standard BlockhashStore.ApplyBlockhashStateChanges()
    • Leverages core infrastructure instead of custom transaction-based approach

Chainspec Configuration

  • All Chainspecs (arbitrum-local.json, arbitrum-sepolia.json, arbitrum-system-test.json):
    • Added "eip2935RingBufferSize": "0x5FFD0" (393,168)
  • Genesis Block Fixes (arbitrum-system-test.json):
    • Fixed mixHash byte ordering: 0x...28000000... → 0x...00000028...
    • Fixed account balances: added missing F digit for max UInt256

Test Infrastructure

  • Added initialArbOsVersion parameter to test infrastructure
  • Set Eip2935RingBufferSize = 393168 in FullChainSimulationReleaseSpec
  • Tests now use ArbOS v40 to enable EIP-2935

@AnkushinDaniil AnkushinDaniil changed the title Daniil/test/system test fix state match fix: make TestExecutionClientOnlyComparison pass Oct 30, 2025
@AnkushinDaniil AnkushinDaniil changed the title fix: make TestExecutionClientOnlyComparison pass fix: make TestExecutionClientOnlyComparison pass Oct 30, 2025
@AnkushinDaniil AnkushinDaniil force-pushed the daniil/test/system-test-fix-state-match branch from b24113e to 131f19c Compare October 30, 2025 15:51
@AnkushinDaniil AnkushinDaniil marked this pull request as ready for review October 30, 2025 16:03
Copilot AI review requested due to automatic review settings October 30, 2025 16:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements EIP-2935 (historical block hash storage) for Arbitrum, enabling the TestExecutionClientOnlyComparison test to pass by providing proper historical block hash access functionality.

Key changes include:

  • Adding EIP-2935 support with Arbitrum-specific configuration and ring buffer sizing (393,168 blocks)
  • Deploying a custom history storage contract at ArbOS v40 upgrade that uses L2 block numbers
  • Removing custom block hash processing in favor of Nethermind's standard implementation

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
arbitrum-system-test.json Adds EIP-2935 ring buffer configuration and fixes genesis block data formatting
arbitrum-sepolia.json Adds EIP-2935 ring buffer size configuration
arbitrum-local.json Adds EIP-2935 ring buffer size configuration
ArbitrumTransactionProcessor.cs Removes custom ProcessParentBlockHash method and related code
ArbitrumDynamicSpecProvider.cs Enables EIP-2935 and EIP-7709 for ArbOS v40+
Precompiles.cs Adds Arbitrum-specific historical block hash storage contract bytecode
ArbosState.cs Deploys history storage contract during ArbOS v40 upgrade
ArbitrumEthRpcModuleTests.cs Adds comprehensive test for historical block hash functionality
FullChainSimulationSpecProvider.cs Sets EIP-2935 ring buffer size for test infrastructure
FullChainSimulationChainSpecProvider.cs Adds support for configurable initial ArbOS version in tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AnkushinDaniil AnkushinDaniil force-pushed the daniil/test/system-test-fix-state-match branch from 2aadfd4 to 6ad2563 Compare October 31, 2025 14:44
@AnkushinDaniil AnkushinDaniil enabled auto-merge (squash) October 31, 2025 14:45
@github-actions
Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Branch Rate Health
Nethermind.Arbitrum 79% 54%
Summary 79% (7431 / 9373) 54% (1686 / 3099)

Minimum allowed line rate is 60%

@AnkushinDaniil AnkushinDaniil merged commit 3e6d73e into main Oct 31, 2025
5 checks passed
@AnkushinDaniil AnkushinDaniil deleted the daniil/test/system-test-fix-state-match branch October 31, 2025 14:54
@AnkushinDaniil AnkushinDaniil restored the daniil/test/system-test-fix-state-match branch October 31, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants